package ${classPath};

import java.util.Date;
import java.util.Set;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.Length;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import top.lemna.base.core.dto.range.TimeRange;

@Data
@ToString
@Accessors(chain = true)
public class  ${domain}QueryDto {

<#list fieldList as field>
<#compress>
  /** ${field.comment} */
<#list field.annotations as annotation> 
<#if annotation?starts_with("@Column")>
<#if field.type="String">
  @Length(max = ${annotation?substring(annotation?last_index_of("length")+7,annotation?last_index_of(","))})
</#if>
<#if field.type="Long">
  @Min(0)
  @Max(Integer.MAX_VALUE)
</#if>
<#if field.type="Integer">
  @Min(0)
  @Max(Integer.MAX_VALUE)
</#if>
<#if field.type="Double">
  @Digits(integer=6, fraction=2)
</#if>
</#if>
</#list>
  private ${field.type} ${field.name};
</#compress>

<#if field.name?ends_with("ype") || field.name?ends_with("tatus")>
  /** 排除${field.comment} */
  @Size(max = 5)
  private Set<${field.type}> exclude${field.name?cap_first};
 
  /** 包含${field.comment} */
  @Size(max = 5)
  private Set<${field.type}> include${field.name?cap_first};
</#if>
</#list>
  
  /** 创建时间 */
  private TimeRange createTime; 
}